#include <stdio.h>
#include <string.h>

void myfunc(char * a, int b)
{
	__asm{
		lea ebp, [eax+ecx]
		retn
	}
}

void main()
{
	int a = 0x666;
	int b = 0x777;
	int c = 0;

	__asm{
		push ebp
		push edi

		mov eax, [a]
		mov ecx, [b]
		lea edi, c

		call myfunc

		mov [edi], ebp
		pop edi
		pop ebp
	}

	printf("c = %x\n", c);
}
